<html>
<head><meta charset="utf-8"><title>-Z build-std &amp; staticlib targets · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/-Z.20build-std.20.26.20staticlib.20targets.html">-Z build-std &amp; staticlib targets</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="226693233"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/-Z%20build-std%20%26%20staticlib%20targets/near/226693233" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Ricky Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/-Z.20build-std.20.26.20staticlib.20targets.html#226693233">(Feb 17 2021 at 17:27)</a>:</h4>
<p>Hi, I'm trying to build a staticlib target with <code>-Z build-std=core</code>. At the moment, it looks like this doesn't include the libcore / libcompiler_builtins objects, so I get some very sad link errors when I consume the staticlib (which I've verified work fine if I manually include the built rlibs for core/compiler_builtins). IIUC without build-std, the required std / core / etc objects get bundled in so that the staticlib can just be linked to C code, etc.</p>
<p>Is this a bug? (Or am I missing something?)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>